import logging,yagmail
def log_set():
    logging.basicConfig(filemode='w+',filename='loge.txt',level=logging.DEBUG,format=' ')

def send_mali(filepath):
    mail = yagmail.SMTP(user='3406362198',password='bcrgotjogidqcjjd',host='smtp.qq.com')
    mail.send(to='3406362198@qq.com',subject='测试报告',contents='今日报告',attachments=filepath)

import yaml,json
def getyamldata(filepath):
    with open(filepath,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)
def getjsondata(filepath):
    with open(filepath,'r',encoding='utf-8') as f:
        return json . safe_load(f)